// 爬楼梯

import Foundation
func climbStairs(_ n: Int) -> Int {
    
    if n <= 2 {
        return n
    }
    
    var one = 1
    var two = 2
    for _ in 3...n {
        two = one + two
        one = two - one
    }
    return two
}

